<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
		    	xmlns:rich="http://richfaces.org/rich"
		    	xmlns:a="http://richfaces.org/a4j"
	            xmlns:p="http://primefaces.prime.com.tr/ui" 
    			xmlns:kiwi="http://www.kiwi-project.eu/jsf">
		<s:span id="testGroupedRecomlist" rendered="#{currentUser.userPreference != null and currentUser.userPreference.showTagGroupedRecommendation}">
            <p:tab title="Grouped recommendations">
	            <s:span id="recomlistbytags" rendered="#{recommendationActionScope.groupedRecommendations.size() &gt; 0}">
	                <div><ul>
	                    <ui:repeat var="recommendationbytags" value="#{recommendationActionScope.groupedRecommendations}" >
	                    <li><b><h:outputText value="Tag:"/><h:outputText value="#{recommendationbytags.getKey().title}"/></b>
	                        <ul>
	                        <ui:repeat var="contentitems" value="#{recommendationbytags.getValue()}">
	                            <li>
	                            <kiwi:link contentItem="#{contentitems}"/>
	                            <br/>
	                            <h:outputText value="by "/>
	                            <h:outputText value="#{contentitems.author.firstName} "/>
	                            <h:outputText value="#{contentitems.author.lastName}"/>
	                            </li>
	                        </ui:repeat>
	                        </ul>
	                    </li>
	                    </ui:repeat>
	                </ul></div>
	            </s:span>
	            <s:span id="norecomlistbytags" rendered="#{recommendationActionScope.groupedRecommendations.size() &lt;= 0}">
	                        <h:outputText value="No Grouped Recommendations"/>
	            </s:span>
		</p:tab>
	</s:span>
</ui:composition>